package org.ysu.service;

import com.sun.org.apache.xpath.internal.operations.Bool;
import io.minio.errors.*;
import org.springframework.web.multipart.MultipartFile;
import org.ysu.entity.Interview;
import com.baomidou.mybatisplus.extension.service.IService;

import java.io.IOException;
import java.math.BigDecimal;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 走访记录表 服务类
 * </p>
 *
 * @author LiuJunDa
 * @since 2024-08-16
 */
public interface InterviewService extends IService<Interview> {

    Boolean add(Long vcId, Long fId, LocalDate time, String riskType, String riskRemark, BigDecimal income, BigDecimal liability, String suggestion, String detail, MultipartFile photo) throws ServerException, InsufficientDataException, ErrorResponseException, IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidResponseException, XmlParserException, InternalException;
    List<Interview> list(Long fId);
    Boolean update(Long id, Long fId, LocalDate time, String riskType, String riskRemark, BigDecimal income, BigDecimal liability, String suggestion, String detail, MultipartFile photo) throws ServerException, InsufficientDataException, ErrorResponseException, IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidResponseException, XmlParserException, InternalException;
    BigDecimal getAvgIncomeByRegionId(Long regionId);
    List<Integer> getDailyInterviewCounts(LocalDate startDate, LocalDate endDate, Long rId);
    List<List<Object>> getAdminInterviewSummaries(Long rId, LocalDate startDate, LocalDate endDate);
}
